package net.funwoo.pandago.server;

import net.funwoo.pandago.model.Email;
import net.funwoo.pandago.model.RegisterInfo;
import net.funwoo.pandago.model.UserInfo;

import java.util.List;

import retrofit.Callback;
import retrofit.client.Response;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;

/**
 * Created by Bob Peng on 2015/5/6.
 */
public interface UserService {

    @POST("/users/helpee/register/")
    void register(@Body RegisterInfo info, Callback<Integer> callback);

    @POST("/users/login/")
    void login(@Body RegisterInfo info, Callback<Integer> callback);

    @POST("/users/login/avatar/")
    void getUserId(@Body Email email, Callback<Integer> callback);

    @GET("/users/{id}/get/avatar/")
    void getAvatar(@Path("id") int userId, Callback<Response> callback);

    @GET("/users/{id}/get/information/")
    void getInfos(@Path("id") int userId, Callback<List<UserInfo>> callback);

    @GET("/users/{id}/get/addresses/")
    void getAddress(@Path("id") int userId, Callback<List<UserInfo>> callback);

    @GET("/users/{id}/get/orderNumber/")
    void getOrderNumber(@Path("id") int userId, Callback<Integer> callback);

    @GET("/users/{id}/get/mark/sum/")
    void getMarkSum(@Path("id") int userId, Callback<Integer> callback);

}
